﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dycox.Workflows.Manipulation;

namespace Dycox.Workflows
{
    public class CompletingStageEventArgs : System.ComponentModel.CancelEventArgs
    {
        internal CompletingStageEventArgs(MoveResult result)
        {
            _result = result;
        }

        public Stage Stage
        {
            get
            {
                return _result.CurrentStage;
            }
        }

        private MoveResult _result;

        public Stage[] ImmediateStages
        {
            get { return _result.ImmediateStages; }
        }

        //public WFStep[] NewSteps
        //{
        //    get { return _result.NewSteps; }
        //}

        public WorkflowComponentStatus ProcessStatus
        {
            get { return _result.CurrentStep.Thread.Process.Status; }
        }

        public int NewStepCount
        {
            get { return _result.NewStepCount; }
        }

        public Stage[] NewStages
        {
            get { return _result.AllStages; }
        }

    }

    public delegate void CompletingStageEventHandler(object sender, CompletingStageEventArgs e);
}
